#!/bin/bash
# docker stop nacos
# docker rm nacos
docker run -d --name nacos \
  -p 8848:8848 \
  -p 9848:9848 \
  -p 9849:9849 \
  --env MODE=standalone \
  --env NACOS_SERVERS=172.16.60.234 \
  --env NACOS_SERVER_IP=172.16.60.234 \
  --env SPRING_DATASOURCE_PLATFORM=mysql \
  --env JVM_XMX=1g \
  --env MYSQL_SERVICE_HOST=172.16.60.234 \
  --env MYSQL_SERVICE_DB_NAME=nacos \
  --env MYSQL_SERVICE_USER=root \
  --env MYSQL_SERVICE_PASSWORD=Mysql@2024#! \
  --env MYSQL_SERVICE_DB_PARAM="characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false" \
  --env MYSQL_DATABASE_NUM=1 \
  -v /Users/apple/code/gitee/dolphin4j-docker/docker/nacos/conf:/home/nacos/conf \
  -v /Users/apple/code/gitee/dolphin4j-docker/docker/nacos/logs:/home/nacos/logs \
  nacos/nacos-server && docker logs -f nacos